/*
 * @Author: huirui@huanqiu.com
 * @Date: 2024-08-28 11:24:26
 * @LastEditors: huirui@huanqiu.com
 * @LastEditTime: 2024-08-28 15:12:02
 * @Description: 微信公众平台及时响应API
 */

const express = require("express");
const {
  wechatAuthMiddleware,
  getDrafts,
  getTags,
  publishArticleByTag,
} = require("../../v1/handlers/wechat/wechatApi");
const router = express.Router();

// 使用认证中间件
router.use("/wechat", wechatAuthMiddleware);

// 获取草稿箱列表的路由
router.get("/wechat/drafts", getDrafts);

// 获取标签列表的路由
router.get("/wechat/tags", getTags);

//通过标签，发布文章
router.post("/wechat/publish", publishArticleByTag);

module.exports = router;
